﻿<?xml version="1.0" encoding="utf-8" ?>
<AdoNetDataAccess connection="$CalendarDBConnection$" formatter="bizobjlist of ArticleAppFunction">
  <Sql >
      SELECT 
        '$specifierId$' as specifierId,
        convert(nvarchar(510),a.id) as id,
        baseTitle as description
      FROM
        Articles as a
        INNER JOIN ObjectTreeCounts as tc on tc.objectId = a.id
      WHERE
		tc.objectId = tc.rootId AND tc.treeName = @treeName AND
        CompanyId = @companyId;
  </Sql>
  <Param name="companyId" type="UniqueIdentifier" />
	<Param name="treeName" type="String" />
</AdoNetDataAccess>
